package com.smalljj.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Window;

import com.smalljj.comm.ActivityStackControlUtil;
import com.smalljj.comm.Constants;

public class SplashActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);// 去除标题
		setContentView(R.layout.splash);   
		ActivityStackControlUtil.add(this);
		Log.i(Constants.LOG_TAG, "启动欢迎画面...");
        new Handler().postDelayed(new Runnable() {
            public void run() {
                Intent intent = new Intent(SplashActivity.this, MainActivity.class);
                SplashActivity.this.startActivity(intent);
                SplashActivity.this.finish();
            }
        }, 3500);
	}
	
	@Override
	protected void onDestroy() {
        super.onDestroy(); 
        //移出管理栈
        ActivityStackControlUtil.remove(this); 
	} 
}